﻿using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using ZH.GPT.Infrastructures.Entities;

namespace ZH.GPT.Domains.ChatMessage.Response
{
    /// <summary>
    /// 查询消息体
    /// </summary>
    public class ChatMessagesPDTO
    {
        /// <summary>
        /// 总数
        /// </summary>
        public int TotalCount { get; set; }

        /// <summary>
        /// 当前页
        /// </summary>
        public int CurrentPage { get; set; }

        /// <summary>
        /// 页大小
        /// </summary>
        public int PageSize { get; set; }

        /// <summary>
        /// 订单集合
        /// </summary>
        public List<ChatMessageDTO> RoutingTasks { get; set; }

        /// <summary>
        /// ToString
        /// </summary>
        /// <returns></returns>
        public override string ToString() => JsonConvert.SerializeObject(this);
    }


    /// <summary>
    /// 消息
    /// </summary>
    public class ChatMessageDTO
    {
        /// <summary>
        /// 消息id
        /// </summary>
        public string Id { get; set; }
        /// <summary>
        /// 用户id
        /// </summary>
        public string UserId { get; set; }
        /// <summary>
        /// 消息框id
        /// </summary>
        public string ChatId { get; set; }
        /// <summary>
        /// 消息内容
        /// </summary>
        public string Content { get; set; }
        /// <summary>
        /// 排序
        /// </summary>
        public Int64 Sort { get; set; }
        /// <summary>
        /// 消息类型
        /// </summary>
        public MessageRole Role { get; set; }
        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime CreatedTime { get; set; }
    }
}
